package logic.strategy;

import java.util.HashMap;

import logic.Continent;
import logic.Country;

public class ConquerDoubleStrategy extends ConquerStrategy {

	private Continent second; // the second continent to conquer
	
	public ConquerDoubleStrategy(Continent continentToConquer, Continent second) {
		super(continentToConquer);
		this.second = second;
	}
	
	/**
	 * Return all the countries in the target continent which are
	 * not owned by player
	 */
	public HashMap<String, Country> getTargetCountries() {
		HashMap<String, Country> rs = new HashMap<String,Country>();
		for (Country country : cont.getTerritoriesContained())
			if (!country.getOwner().equals(player))
				rs.put(country.getName(), country);
		for (Country country : second.getTerritoriesContained())
			if (!country.getOwner().equals(player))
				rs.put(country.getName(), country);
		return rs;
	}

}
